<div>
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-title">
                    <h5>查询条件</h5>
                    <div class="ibox-tools" style="top:10px;">

                    </div>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-4">
                            <select class="custom-select" v-model="hostManageInfo.conditions.groupId">
                                <option selected value="">请选择主机组</option>
                                <option value="10001">生产</option>
                                <option value="10002">测试</option>
                            </select>
                        </div>
                        <div class="col-sm-4">
                            <div class="form-group">
                                <input type="text" placeholder="请输入主机名称" v-model="hostManageInfo.conditions.name" class=" form-control">
                            </div>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                <input type="text" placeholder="请输入IP" v-model="hostManageInfo.conditions.ip" class=" form-control">
                            </div>
                        </div>
                        <div class="col-sm-1">
                            <button type="button" class="btn btn-primary btn-sm" v-on:click="_queryHostMethod()">
                                <i class="glyphicon glyphicon-search"></i> 查询
                            </button>
                        </div>
                    </div>


                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>主机信息</h5>
                    <div class="ibox-tools" style="top:10px;">
                        <button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddHostModal()">
                            <i class="glyphicon glyphicon-plus"></i>
                            添加主机
                        </button>
                    </div>
                </div>
                <div class="ibox-content">

                    <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
                        <thead>
                            <tr>
                                <th class="text-center">主机组</th>
                                <th class="text-center">主机名称</th>
                                <th class="text-center">主机IP</th>
                                <th class="text-center">用户名</th>
                                <th class="text-center">CPU核数/使用</th>
                                <th class="text-center">内存/使用</th>
                                <th class="text-center">磁盘大小/使用</th>
                                <th class="text-center">状态</th>
                                <th class="text-center">在线</th>
                                <th class="text-center">操作</th>


                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="host in hostManageInfo.hosts">
                                <td class="text-center">{{host.groupName}}</td>
                                <td class="text-center">{{host.name}}</td>
                                <td class="text-center">{{host.ip}}</td>
                                <td class="text-center">{{host.username}}</td>
                                <td class="text-center">{{host.cpu}}/{{host.useCpu}}%</td>
                                <td class="text-center">{{host.mem}}/{{host.useMem}}</td>
                                <td class="text-center">{{host.disk}}/{{host.useDisk}}</td>
                                <td class="text-center">{{_getStateName(host.state)}}</td>
                                <td class="text-center">{{_getOnline(host.heartbeatTime)}}</td>
                                <td class="text-center">
                                    <div class="btn-group" v-if="host.state=='2002'">
                                        <button class="btn-white btn btn-xs" v-on:click="_openConsole(host)">控制台</button>
                                    </div>
                                    <!--v-if="host.state=='2002'"-->
                                    <div class="btn-group">
                                        <button class="btn-white btn btn-xs" v-on:click="_openFileManager(host)">文件</button>
                                    </div>
                                    <div class="btn-group" v-if="host.state=='1001'">
                                        <button class="btn-white btn btn-xs" v-on:click="_controlHost(host)">管理主机</button>
                                    </div>
                                    <div class="btn-group">
                                        <button class="btn-white btn btn-xs" v-on:click="_openEditHostModel(host)">修改</button>
                                    </div>
                                    <div class="btn-group" v-if="host.hostId != '5f3761ed-008a-475b-ad37-8cc35c88402c'">
                                        <button class="btn-white btn btn-xs" v-on:click="_openDeleteHostModel(host)">删除</button>
                                    </div>
                                </td>

                            </tr>
                        </tbody>
                        <tfoot>
                            <tr>
                                <td colspan="7">
                                    <ul class="pagination float-right"></ul>
                                </td>
                            </tr>
                        </tfoot>
                    </table>
                    <!-- 分页 -->
                    <div class="row">
                        <div class="col-md-4">
                            <span class="margin-left">注意：管理主机时确保主机上安装了wget命令</span>
                        </div>
                        <div class="col-md-8 text-center">
                            <vc:create path="frame/pagination"></vc:create>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>



    <vc:create path="admin/addHost" callBackListener="" callBackFunction=""></vc:create>
    <vc:create path="admin/editHost"></vc:create>
    <vc:create path="admin/deleteHost"></vc:create>

</div>